package Serwer;

import static org.junit.Assert.*;

import org.junit.Before;
import org.junit.Test;

public class TableTest {
	Table x;

	@Before
	public void setUp() throws Exception {
		x = new Table( null, null);
	}

	@Test
	public void test() {
		Karta[] y = new Karta[5];
		y[0] = new Karta(0,5);
		y[1] = new Karta(3,0);
		y[2] = new Karta(2,6);
		y[3] = new Karta(1,0);
		y[4] = new Karta(3,7);
		x.sort(y);
		
		if(y[0].Wartosc != 0 || y[0].Kolor!=1){
			//System.out.println("1");
			fail("1");
		}
		if(y[1].Wartosc != 0 || y[1].Kolor!=3){
			//System.out.println("2");
			fail("2");
		}
		if(y[2].Wartosc != 5 || y[2].Kolor!=0){
			//System.out.println("3");
			fail("3");
		}
		if(y[3].Wartosc != 6 || y[3].Kolor!=2){
			//System.out.println("4");
			fail("4");
		}
		if(y[4].Wartosc != 7 || y[4].Kolor!=3){
			//System.out.println("5");
			fail("5");
		}
		
		
	}

}
